package com.zl.easybuy.vo;

import lombok.Getter;

@Getter
public enum ResultCode {
    SUCCESS(2000,"成功响应"),
    LOGIN_FAIL(1001,"登录失败，用户名或者密码错误！"),
    REGISTER_FAIL(1002,"该用户名已存在请重新注册！"),
    ADD_CART_FAIL(1003,"商品数量不足！"),
    FAIl(1004,"操作失败！");
    private int code; //状态码
    private String msg; //消息
    ResultCode(int code,String msg){
        this.code = code;
        this.msg = msg;
    }

    public void setMsg(String message) {
        this.code = code;
        this.msg = msg;
    }
}
